package com.kjj.gift.controller;

import com.kjj.gift.dto.SMSCodeDto;
import com.kjj.gift.service.ISmsCodeService;
import com.kjj.gift.service.ISmsService;
import com.kjj.gift.util.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

@RestController
@RequestMapping("/sms")
public class SmsCodeController {
    @Autowired
    private ISmsCodeService smsService;
    @PostMapping("/sendSmsCode")
    public AjaxResult sendSmsCode(@RequestBody @Valid SMSCodeDto smsCodeDto){
        return smsService.sendSmsRegisterCode(smsCodeDto);
    }
}
